package PLCSymbolAndScope;

//生成唯一ID标记符号、符号表、作用域对象
public class IDGenerator {
    //TODO:内置类型id，待补充,符号id和类型id需要随之修改
    static public int SINTID = 0;
    static public int INTID = 1;
    static public int DINTID = 2;
    static public int LINTID = 3;

    //符号id
    static int symbolId = 4;

    //类型id
    static int typeId = 4;

    //符号表id
    static int tableId = 0;

    //作用域id
    static int scopeId = 0;


    //输出ID
    public static int newSymbolId(){
        return symbolId++;
    }

    public static int newTableId(){
        return tableId++;
    }

    public static int newScopeId(){
        return scopeId++;
    }

    public static int newTypeId(){
        return typeId++;
    }



}
